package org.tigris.atlas.xml.schema.mda.element;

/**
 * A wrapper object to help with the generation of namespace locations.
 */
public class SchemaNamespace {

	private String namespaceName;
	private String namespaceLocation;
	private String namespaceBase;
	
	/**
	 * Creates a new instance with the specific name and location.  In the following 
	 * schema namespace example: xmlns:xs="http://www.w3.org/2001/XMLSchema", the value
	 * of name would be 'xs' and the value of location would be 'http://www.w3.org/2001/XMLSchema'
	 * @param object A <tt>NamespaceAware</tt> object from which to pull needed values
	 */
	public SchemaNamespace(NamespaceAware object) {
		namespaceName = object.getNamespaceName();
		namespaceLocation = object.getNamespaceLocation();
		namespaceBase = object.getBase();
	}

	/**
	 * @return Returns the namespaceLocation.
	 */
	public String getLocation() {
		return namespaceLocation;
	}

	/**
	 * @return Returns the namespaceName.
	 */
	public String getName() {
		return namespaceName;
	}
	
	/**
	 * @return Returns the namespaceBase.
	 */
	public String getBase() {
		return namespaceBase;
	}	
	
}
